package com.zhehekeji.opsys.api.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @ClassName TDrawRecordDay
 * @Description TODO
 * @author chenweiliu chenwei.liu@163.com
 * @date 2016-9-22   上午9:39:10
 */
@Entity
@Table(name="t_draw_record_day")
public class TDrawRecordDay implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -4666105530551005521L;
	private Long id;
	private TActivity tactivity;
	private String account;
	private Date drawTime;
	private Long cpCode;
	private String mobile;
	public TDrawRecordDay() {
	}
	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER,optional=true)
	@JoinColumn(name="ACTIVITY_ID")
	public TActivity getTactivity() {
		return tactivity;
	}

	public void setTactivity(TActivity tactivity) {
		this.tactivity = tactivity;
	}

	@Column(name="ACCOUNT",length=64,nullable=true)
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="DRAW_TIME", nullable=true)
	public Date getDrawTime() {
		return this.drawTime;
	}

	public void setDrawTime(Date drawTime) {
		this.drawTime = drawTime;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return cpCode;
	}
	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}
	@Column(name="MOBILE",length=20,nullable=true)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
}

